package com.sise.stuteaintersys.mapper;

import com.sise.stuteaintersys.bean.entity.DownloadInfo;
import com.sise.stuteaintersys.bean.entity.DownloadInfoExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DownloadInfoMapper {
    int countByExample(DownloadInfoExample example);

    int deleteByExample(DownloadInfoExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(DownloadInfo record);

    int insertSelective(DownloadInfo record);

    List<DownloadInfo> selectByExample(DownloadInfoExample example);

    DownloadInfo selectByPrimaryKey(Integer id);
    /**
     *  返回该课程的所有的留言信息
     *
     *@param courseId 课程编号
     *@return List<Message> 留言列表
     *@date 2019/1/1
     *@time 22:52
     */
    @Select({"select * from download_info where download_info.course_id=#{courseId}"})
    List<DownloadInfo> selectAllDownloadInfo(Integer courseId);

    int updateByExampleSelective(@Param("record") DownloadInfo record, @Param("example") DownloadInfoExample example);

    int updateByExample(@Param("record") DownloadInfo record, @Param("example") DownloadInfoExample example);

    int updateByPrimaryKeySelective(DownloadInfo record);

    int updateByPrimaryKey(DownloadInfo record);
}